#include "Extras.h"

Extras::Extras ( ICar * car) {
	if (car == 0) { throw std::exception("Null-Pointer in Extras()..."); }
	mCar = car;
}

Extras::~Extras() {
	if (mCar != 0) {
		delete mCar; mCar = 0;
	}
}

void Extras::Print (std::ostream & out) const {
	mCar->Print(out);
	DoPrint(out);
}

float Extras::GetPrice() const {
	return mPrice + mCar->GetPrice();
}

std::string const& Extras::GetManufacturer() const{
	return mCar->GetManufacturer();
}

std::string const& Extras::GetType() const{
	return mCar->GetType();
}